<?php
class ModelMessageVigilantePolice extends Model {
	public function getAllPolice($community_id) {
		$query = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "config_assistant_police mna WHERE mna.community_id = '" . (int)$community_id . "' ");
	
		return $query->rows;
	}
	
	public function getAssistantPolice($assistant_police_id){
		$query = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "config_assistant_police mna WHERE mna.assistant_police_id = '" . (int)$assistant_police_id . "' ");
	
		return $query->row;
	}
	
	public function getVigilantePolices(){
		$query = $this->db->query("SELECT  c.* from  ".DB_PREFIX."customer_group cg left join ".DB_PREFIX."customer c on(c.customer_group_id=cg.customer_group_id)  where cg.customer_group_id=2");
		return $query->rows;
	}
}
?>